<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>template</title>
</head>
<body>
<div id="header" style="background-color:blueviolet;width: auto;height: 100px">
    <span style="color: yellowgreen;align-self: center;display: flex;justify-content: center;font-size: large;">
        <b>当前位置可以定义页眉</b>
    </span>
</div>
<div th:fragment="footer" style="background-color: aqua;width: auto;height: 100px">
    <span style="color: red;align-self: center;display: flex;justify-content: center;font-size: large;">
        <b>当前位置可以定义页脚</b>
    </span>
</div>

<div th:fragment="selfInsert">
    <span>这里是当前模板页面的一个引用演示</span>
    <div th:insert="~{::footer}"></div>
    <div th:insert="~{this::#header}"></div>
</div>



</body>
</html>